<!--
 * @Author: nie
 * @Date: 2020-03-20 22:52:52
 * @LastEditors: nie
 * @LastEditTime: 2020-03-20 23:11:26
 * @Description: file content
 -->
<template>
  <div class="login-container">
    <div class="login-box">
      <el-form ref="form" :model="form">
        <el-form-item>
          <el-input v-model="form.username"></el-input>
        </el-form-item>
        <el-form-item>
          <el-input v-model="form.password" type="password"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="login">登录</el-button>
          <el-button>重置</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: "Login",
  data() {
      return {
        form: {
          username: '',
          password: ''
        }
      }
  },
  methods: {
      login() {
          this.$router.push('/home');
      }
  }
};
</script>

<style scoped>
.login-container {
  width: 100%;
  height: 100%;
  background-color: #2f4f6f;

  display: flex;
  justify-content: center;
  align-items: center;
}
.login-box {
  width: 450px;
  height: 300px;
  background-color: #fff;
}
</style>